<template>
  <div class="common-layout">
    <el-container>
      <el-header>
        <Header></Header>
      </el-header>
      <el-container>
        <el-aside width="auto" >
          <el-scrollbar height="100%">
            <Menu></Menu>
          </el-scrollbar>
        </el-aside>
        <el-container>
          <el-main>Main</el-main>
          <el-footer>Footer</el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>


<script setup lang="ts">
import Menu from "./menu.vue";
import Header from "./header.vue";
import { computed } from 'vue';
import { useGlobalStore } from '@/stores/useGlobalStore.ts'

const globalStore = useGlobalStore();
const collapse = computed(() => globalStore.isCollapse);
console.log(collapse);
</script>

<style scoped lang="scss">
.el-header {
  height: 50px;
  border-bottom: 1px solid #000;
  padding: 0;
}
.el-aside {
  height: calc(100vh - 50px);
  .layout-1 {
    width: 150px;
    height: calc(100vh - 50px);
  }
  .layout-1.el-menu--collapse{
    width: 50px;
  }
}
</style>